<template>
  <div :style="styleObject">
    <slot></slot>
  </div>
</template>

<script>
export default {
  name: "CustomBorder",
  props: {
    borderImg: {
      type: String,
      required: true,
    },
    borderSlice:{
      type: Number,
      default: 30,
    },
    borderWidth:{
      type: Number,
      default: 10,
    }
  },
  data(){
    return{
      styleObject:{
        'border': `${this.borderWidth}px solid transparent`,
        'border-image': `url(${this.borderImg}) ${this.borderSlice} round`,
      }
    }
  },
}
</script>

<style scoped>

</style>
